package com.bw.mapper;

import com.bw.domain.Role;
import com.bw.domain.TbMenu;
import com.bw.domain.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: Wrj
 * @Date: 2025/3/8 08:32
 * @Description:
 **/
public interface UserMapper {
    User login(String username);

    List<Role> listRole(Integer userId);

    List<TbMenu> listMenus(Integer userId);

    List<User> list(User user);

    List<Role> listRoleName();

    int checkedUsername(String username);

    void add(User user);

    void instrUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);

    @Select("select * from t_user")
    List<User> listUser();

    void addBeach(User user);

    List<User> listByIds(@Param("ids") String ids);
}
